package com.spzx.product.api;


import com.spzx.common.core.constant.ServiceNameConstants;
import com.spzx.common.core.domain.R;
import com.spzx.product.api.factory.RemoteCategoryFallbackFactory;
import com.spzx.product.api.factory.RemoteProductFallbackFactory;
import com.spzx.product.domain.Category;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

@FeignClient(value = ServiceNameConstants.PRODUCT_SERVICE,
        fallbackFactory = RemoteCategoryFallbackFactory.class)
public interface RemoteCategoryService {


    //http://xxx:9204/category/listCatesTree
    @Operation(summary = "内部调用接口：查询分类树")
    @GetMapping("category/listCatesTree")
    public R<List<Category>> listCatesTree();

}